package com.feng.zhihao.apigeteway.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ChannelInterfaceCase entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CHANNEL_INTERFACE_CASE")

public class ChannelInterfaceCase implements java.io.Serializable {

	// Fields

	private ChannelInterfaceCaseId id;
	private ModularInfo modularInfo;
	private InterfaceInfo interfaceInfo;
	private ChannelInfo channelInfo;
	private InterfaceCaseInfo interfaceCaseInfo;
	private ProjectInfo projectInfo;
	private Integer interfaceCaseState;

	// Constructors

	/** default constructor */
	public ChannelInterfaceCase() {
	}

	/** minimal constructor */
	public ChannelInterfaceCase(ChannelInterfaceCaseId id, ModularInfo modularInfo, InterfaceInfo interfaceInfo,
			ChannelInfo channelInfo, InterfaceCaseInfo interfaceCaseInfo, ProjectInfo projectInfo) {
		this.id = id;
		this.modularInfo = modularInfo;
		this.interfaceInfo = interfaceInfo;
		this.channelInfo = channelInfo;
		this.interfaceCaseInfo = interfaceCaseInfo;
		this.projectInfo = projectInfo;
	}

	/** full constructor */
	public ChannelInterfaceCase(ChannelInterfaceCaseId id, ModularInfo modularInfo, InterfaceInfo interfaceInfo,
			ChannelInfo channelInfo, InterfaceCaseInfo interfaceCaseInfo, ProjectInfo projectInfo,
			Integer interfaceCaseState) {
		this.id = id;
		this.modularInfo = modularInfo;
		this.interfaceInfo = interfaceInfo;
		this.channelInfo = channelInfo;
		this.interfaceCaseInfo = interfaceCaseInfo;
		this.projectInfo = projectInfo;
		this.interfaceCaseState = interfaceCaseState;
	}

	// Property accessors
	@EmbeddedId

	@AttributeOverrides({
			@AttributeOverride(name = "channelId", column = @Column(name = "CHANNEL_ID", nullable = false, length = 36)),
			@AttributeOverride(name = "interfaceCaseId", column = @Column(name = "INTERFACE_CASE_ID", nullable = false, length = 36)) })

	public ChannelInterfaceCaseId getId() {
		return this.id;
	}

	public void setId(ChannelInterfaceCaseId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MODULAR_ID", nullable = false)

	public ModularInfo getModularInfo() {
		return this.modularInfo;
	}

	public void setModularInfo(ModularInfo modularInfo) {
		this.modularInfo = modularInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "INTERFACE_ID", nullable = false)

	public InterfaceInfo getInterfaceInfo() {
		return this.interfaceInfo;
	}

	public void setInterfaceInfo(InterfaceInfo interfaceInfo) {
		this.interfaceInfo = interfaceInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CHANNEL_ID", nullable = false, insertable = false, updatable = false)

	public ChannelInfo getChannelInfo() {
		return this.channelInfo;
	}

	public void setChannelInfo(ChannelInfo channelInfo) {
		this.channelInfo = channelInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "INTERFACE_CASE_ID", nullable = false, insertable = false, updatable = false)

	public InterfaceCaseInfo getInterfaceCaseInfo() {
		return this.interfaceCaseInfo;
	}

	public void setInterfaceCaseInfo(InterfaceCaseInfo interfaceCaseInfo) {
		this.interfaceCaseInfo = interfaceCaseInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PROJECT_ID", nullable = false)

	public ProjectInfo getProjectInfo() {
		return this.projectInfo;
	}

	public void setProjectInfo(ProjectInfo projectInfo) {
		this.projectInfo = projectInfo;
	}

	@Column(name = "INTERFACE_CASE_STATE")

	public Integer getInterfaceCaseState() {
		return this.interfaceCaseState;
	}

	public void setInterfaceCaseState(Integer interfaceCaseState) {
		this.interfaceCaseState = interfaceCaseState;
	}

}